class Solution {
public:
    bool is_vowel(const string& str)
    {
        int end=str.size()-1;
        if ((str[0]=='a'||str[0]=='e'||str[0]=='i'||str[0]=='o'||str[0]=='u')&&(str[end]=='a'||str[end]=='e'||str[end]=='i'||str[end]=='o'||str[end]=='u'))
            return true;
        return false;
    }
    int vowelStrings(vector<string>& words, int left, int right) 
    {
        int s=0;
        for (int i=left;i<=right;i++)
        {
            if (is_vowel(words[i]))
                s++;
        }
        return s;
    }
};
